﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="search.aspx.cs" Inherits="AnyOffice.general.netdisk.search" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<script Language="JavaScript">		
		function CheckForm()
		{
			if (document.Form1.txtKey.value=="")
			{
				alert("关键字不能为空！");
				document.Form1.txtKey.focus();
				return (false);
			}			
			return true;
		}			   
		</script>
	</HEAD>
	<body class="bodycolor" topMargin="5">
		<form id="Form1" method="post" runat="server">
			<TABLE class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<TR>
					<TD class="Big"><IMG height="20" src="/images/menu/netdisk.gif" width="20" align="absMiddle"><SPAN class="big3">
							网络硬盘（<asp:Literal id="litNavTitle" runat="server"></asp:Literal>）</SPAN>
					</TD>
				</TR>
			</TABLE>			
			<asp:Panel id="pnlMain" runat="server">			
				<TABLE class="small" cellSpacing="1" cellPadding="3" width="500" align="center" bgColor="#000000"
					border="0">
					<TR class="TableHeader">
						<TD colSpan="2" nowrap>&nbsp;&nbsp;<IMG src="report_search.gif" align="absMiddle" border="0">&nbsp;请设定搜索条件</TD>
					</TR>
					<TR class="TableData">
						<TD align="right" nowrap>&nbsp;&nbsp;&nbsp;&nbsp;关键字：</TD>
						<TD>
							<asp:TextBox id="txtKey" runat="server" MaxLength="30" Columns="30" CssClass="BigInput"></asp:TextBox></TD>
					</TR>
					<TR  class="TableData">
						<TD align="right" nowrap>位置：</TD>
						<TD><SELECT class="BigSelect" id="parentPath" name="parentPath" runat="server">
								<OPTION selected></OPTION>
							</SELECT>
						</TD>
					</TR>
					<TR class="TableControl">
						<TD align="center" colSpan="2">
							<asp:Button id="btnSubmit" runat="server" CssClass="BigButton" Text="搜索" onclick="btnSubmit_Click"></asp:Button>&nbsp;&nbsp;
							<asp:Button id="btnBack" runat="server" CssClass="BigButton" Text="返回" onclick="btnBack_Click"></asp:Button></TD>
					</TR>
				</TABLE>
			</asp:Panel>			
			<asp:Panel id="pnlSearch" runat="server" Visible="False">			
			
			<asp:Repeater id="rptSearch" runat="server">
				<HeaderTemplate>
					<table class="small" cellSpacing="1" cellPadding="3" width="90%" bgColor="#000000" border="0">
						<tr class="TableHeader">
							<td noWrap>&nbsp;名称</td>
							<td noWrap align="center">大小</td>
							<td noWrap align="center">上传时间</td>
							<td noWrap align="center" width="80">操作</td>
						</tr>
				</HeaderTemplate>
				<ItemTemplate>
				<tr class="TableLine1">
					<td nowrap>
					    <%#Convert.ToBoolean(ViewState["CanDownload"]) == true ? "<A target=\"download_file\" href=\"download.aspx?filename=" + Server.UrlEncode(Eval( "path").ToString()) + "\">" : ""%>
						<img src="/images/files/<%#Eval("img")%>" align="absMiddle" border="0">
						<%#Eval("name")%>
						<%#Convert.ToBoolean(ViewState["CanDownload"]) == true ? "</a>" : ""%>
						<%#Thumb(Eval("path").ToString(), "120") %>
						<%#OfficeMenu(Eval( "path").ToString())%>
					</td>
					<td nowrap align="center"><%#formatSize(Convert.ToInt32(Eval("size"))) %></td>
					<td nowrap align="center"><%#Eval("creationTime") %></td>
					<td nowrap width="80">
						&nbsp;
						<%#Convert.ToBoolean(ViewState["CanDownload"]) == true ? "<A target=\"download_file\" href=\"download.aspx?filename=" + Server.UrlEncode(Eval( "path").ToString()) + "\" title=\"下载文件\"><img src=\"down.gif\" border=\"0\" align=\"absmiddle\"></a>" : ""%>
						<%#Convert.ToBoolean(ViewState["CanManage"]) == true  ? "<A href=\"changefile.aspx?filename=" + Server.UrlEncode(Eval("path").ToString()) + "\" title=\"属性/重命名\"><img src=\"props.gif\" border=\"0\" align=\"absmiddle\"></a>" : ""%>
					</td>
				</tr>
				</ItemTemplate>
				<AlternatingItemTemplate>
				<tr class="TableLine2">
					<td nowrap>
						<%#Convert.ToBoolean(ViewState["CanDownload"]) == true ? "<A target=\"download_file\" href=\"download.aspx?filename=" + Server.UrlEncode(Eval( "path").ToString()) + "\">" : ""%>
						<img src="/images/files/<%#Eval("img")%>" align="absMiddle" border="0">
						<%#Eval("name")%>
						<%#Convert.ToBoolean(ViewState["CanDownload"]) == true ? "</a>" : ""%>
						<%#Thumb(Eval("path").ToString(), "120") %>
						<%#OfficeMenu(Eval( "path").ToString())%>
					</td>
					<td nowrap align="center"><%#formatSize(Convert.ToInt32(Eval("size"))) %></td>
					<td nowrap align="center"><%#Eval("creationTime") %></td>
					<td nowrap width="80">
						&nbsp;
						<%#Convert.ToBoolean(ViewState["CanDownload"]) == true ? "<A target=\"download_file\" href=\"download.aspx?filename=" + Server.UrlEncode(Eval( "path").ToString()) + "\" title=\"下载文件\"><img src=\"down.gif\" border=\"0\" align=\"absmiddle\"></a>" : ""%>
						<%#Convert.ToBoolean(ViewState["CanManage"]) == true  ? "<A href=\"changefile.aspx?filename=" + Server.UrlEncode(Eval("path").ToString()) + "\" title=\"属性/重命名\"><img src=\"props.gif\" border=\"0\" align=\"absmiddle\"></a>" : ""%>
					</td>
				</tr>
				</AlternatingItemTemplate>
				<FooterTemplate>
					</table>
				</FooterTemplate>
			</asp:Repeater>
			<br>
			<center>
			<input class="BigButton" type="button" value="返回根目录" onclick="location='netdisk.aspx';">&nbsp;&nbsp;
			<input class="BigButton" type="button" value="继续搜索" onclick="location='search.aspx';">
			<br><br>
			</center>
			</asp:Panel>
			<asp:Literal id="litMessage" runat="server"></asp:Literal>
		</form>
	</body>
</HTML>
